package com.example.workshop.lesson2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class RecommenderImplementation {
    //过滤器是 RecommenderImplementation 的一个依赖。
        @Autowired
        private  Filter filter;
    public RecommenderImplementation(Filter filter){
        super();
        this.filter=filter;

    }
    public String[] recommendMovies(String movie) {
        //基于内容寻找类型相关电影
        System.out.println("\nName of the filter in use:"+filter+"\n");

        String [] results=filter.getRecommendations("Finding Dory");

        //返回结果
        return results;


    }
}
